package com.codingfuture.web.controller;

import com.codingfuture.entity.Person;
import com.codingfuture.service.PersonService;
import com.codingfuture.service.impl.PersonServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author kobe
 * @Date 2021/11/5 09:02
 * @Description
 */
@Controller
@RequestMapping("/person")
public class PersonController {

    @Autowired
    PersonService personService;

    @RequestMapping("/findAll")
    public List<Person> findAll() {
        List<Person> list = personService.findAll();
        System.out.println(list);
        return list;
    }
}
